package com.greenet.companytemplate.manager.dao;

import com.greenet.companytemplate.common.persistence.CrudDao;
import com.greenet.companytemplate.common.persistence.annotation.MyBatisDao;
import com.greenet.companytemplate.manager.entity.Menu;

import java.util.List;

/**
 * Created by Administrator on 2016/4/26.
 */
@MyBatisDao
public interface SecondMenuDao extends CrudDao<Menu> {

    /**
     * 根据导航栏获取二级菜单
     * @return
     * @throws Exception
     */
    public List<Menu> getSubMenu(int pid) throws Exception;

    /**
     * 根据用户上传的文件，更新二级菜单url
     * @param menu
     */
    public void updateUrl(Menu menu);

    /**
     * 根据菜单名称查询菜单，去重用
     * @param name
     * @return
     */
    public List<Menu> getMenuByName(String name);

}
